import request from '@/utils/request'

// 查询协同办公列表
export function listSynergy(query) {
  return request({
    url: '/approval/synergy/list',
    method: 'get',
    params: query
  })
}

// 查询协同办公详细
export function getSynergy(id) {
  return request({
    url: '/approval/synergy/' + id,
    method: 'get'
  })
}

// 新增协同办公
export function addSynergy(data) {
  return request({
    url: '/approval/synergy',
    method: 'post',
    data: data
  })
}

// 修改协同办公
export function updateSynergy(data) {
  return request({
    url: '/approval/synergy',
    method: 'put',
    data: data
  })
}

// 删除协同办公
export function delSynergy(id) {
  return request({
    url: '/approval/synergy/' + id,
    method: 'delete'
  })
}

// 消息状态修改
export function changeNoticeStatus(id, status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/approval/synergy/changeStatus',
    method: 'put',
    data: data
  })
}
